package com.regent.central.bill.repository.mrp.dto;

import java.math.BigDecimal;

/**
 * 物料到料DTO
 *
 * @author 钟宝林
 * @date 2018-06-18 16:44
 **/
public class MaterialArriveDTO {

    /**
     * 物料采购单ID
     */
    private String billMaterialPurchaseId;
    /**
     * 物料采购单号
     */
    private String billMaterialPurchaseNo;
    /**
     * 物料到料单ID
     */
    private String billMaterialArriveId;
    /**
     * 到料动作ID
     */
    private String actionMaterialArriveId;
    /**
     * 工单ID, 如果是计划外到料这个字段不用管(一般设置为空字符串)
     */
    private String facMissionId;
    /**
     * 物料skuID
     */
    private String commonMaterialsSkuId;

    /**
     * 到料单号
     */
    private String orderNo;
    /**
     * 创建日期
     */
    private String dateCreated;
    /**
     * 到料日期
     */
    private String dateArrive;
    /**
     * 物料供应商ID
     */
    private String supplierId;
    /**
     * 到料员ID
     */
    private String creatorId;
    /**
     * 到料员名称
     */
    private String creatorName;

    // --------- 以下为物料信息 ---------
    /**
     * 冗余成衣款号
     */
    private String styleNo;

    /**
     * 冗余物料ID
     */
    private String commonMaterialsId;

    /**
     * 冗余物料款号
     */
    private String commonMaterialsNo;

    /**
     * 到料数量
     */
    private BigDecimal quantity;

    /**
     * 物料单价
     */
    private BigDecimal priceUnit;

    /**
     * 到料总价
     */
    private BigDecimal priceTotal;

    /**
     * 采购类型  0: 按工单bom需求到料 1: 计划外采购
     */
    private Integer type;

    /**
     * 到料仓库ID
     */
    private String storehouseId;

    /**
     * 采购数量 || 本次采购
     */
    private BigDecimal quantityPurchase;

    public String getActionMaterialArriveId() {
        return actionMaterialArriveId;
    }

    public void setActionMaterialArriveId(String actionMaterialArriveId) {
        this.actionMaterialArriveId = actionMaterialArriveId;
    }

    public String getBillMaterialPurchaseId() {
        return billMaterialPurchaseId;
    }


    public void setBillMaterialPurchaseId(String billMaterialPurchaseId) {

        this.billMaterialPurchaseId = billMaterialPurchaseId;
    }

    public String getBillMaterialPurchaseNo() {
        return billMaterialPurchaseNo;
    }

    public void setBillMaterialPurchaseNo(String billMaterialPurchaseNo) {
        this.billMaterialPurchaseNo = billMaterialPurchaseNo;
    }

    public String getFacMissionId() {
        return facMissionId;
    }

    public void setFacMissionId(String facMissionId) {
        this.facMissionId = facMissionId;
    }

    public String getCommonMaterialsSkuId() {
        return commonMaterialsSkuId;
    }

    public void setCommonMaterialsSkuId(String commonMaterialsSkuId) {
        this.commonMaterialsSkuId = commonMaterialsSkuId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getDateCreated() {
        return dateCreated;
    }

    public void setDateCreated(String dateCreated) {
        this.dateCreated = dateCreated;
    }

    public String getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(String supplierId) {
        this.supplierId = supplierId;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public String getStyleNo() {
        return styleNo;
    }

    public void setStyleNo(String styleNo) {
        this.styleNo = styleNo;
    }

    public String getCommonMaterialsId() {
        return commonMaterialsId;
    }

    public void setCommonMaterialsId(String commonMaterialsId) {
        this.commonMaterialsId = commonMaterialsId;
    }

    public String getCommonMaterialsNo() {
        return commonMaterialsNo;
    }

    public void setCommonMaterialsNo(String commonMaterialsNo) {
        this.commonMaterialsNo = commonMaterialsNo;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getPriceUnit() {
        return priceUnit;
    }

    public void setPriceUnit(BigDecimal priceUnit) {
        this.priceUnit = priceUnit;
    }

    public BigDecimal getPriceTotal() {
        return priceTotal;
    }

    public void setPriceTotal(BigDecimal priceTotal) {
        this.priceTotal = priceTotal;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getBillMaterialArriveId() {
        return billMaterialArriveId;
    }

    public void setBillMaterialArriveId(String billMaterialArriveId) {
        this.billMaterialArriveId = billMaterialArriveId;
    }

    public String getDateArrive() {

        return dateArrive;
    }

    public void setDateArrive(String dateArrive) {
        this.dateArrive = dateArrive;
    }

    public String getStorehouseId() {
        return storehouseId;
    }

    public void setStorehouseId(String storehouseId) {
        this.storehouseId = storehouseId;
    }

    public BigDecimal getQuantityPurchase() {
        return quantityPurchase;
    }

    public void setQuantityPurchase(BigDecimal quantityPurchase) {
        this.quantityPurchase = quantityPurchase;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MaterialArriveDTO that = (MaterialArriveDTO) o;

        if (billMaterialArriveId != null ? !billMaterialArriveId.equals(that.billMaterialArriveId) : that.billMaterialArriveId != null)
            return false;
        if (facMissionId != null ? !facMissionId.equals(that.facMissionId) : that.facMissionId != null) return false;
        return commonMaterialsSkuId != null ? commonMaterialsSkuId.equals(that.commonMaterialsSkuId) : that.commonMaterialsSkuId == null;
    }

    @Override
    public int hashCode() {
        int result = billMaterialArriveId != null ? billMaterialArriveId.hashCode() : 0;
        result = 31 * result + (facMissionId != null ? facMissionId.hashCode() : 0);
        result = 31 * result + (commonMaterialsSkuId != null ? commonMaterialsSkuId.hashCode() : 0);
        return result;
    }
}
